<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>Document</title>
</head>
<body>
<div id="app">
    <home></home>
</div>
<script src="./vue.js"></script>
<script>
    const CommonTitle = {
        template: `
        <div>
          <h3>这是子组件头部</h3>  
          <slot></slot>
          <h3>子组件底部</h3>
        </div>
      `,

    }
    Vue.component('Home', {
        template: `
          <div>
          <h2>我是home</h2>

          <common-title>
            <div>
              <button>插槽嵌套内容</button>
              <i>dhwidwid</i>
            </div>
          </common-title>
          <hr/>
          <common-title>
            <mark>活动我觉得我的酒窝</mark>
          </common-title>
          </div>
        `,
        components: {
            CommonTitle
        }
    })
    const vm = new Vue({
        el: '#app'
    })
</script>
</body>
</html>